package com.open.api.wechat.app.request;

import com.open.api.wechat.app.request.condition.WeChatRetainCondition;
import com.open.api.wechat.app.response.WeChatRetainResponse;
import com.open.api.wechat.common.HttpMethod;
import com.open.api.wechat.common.WeChatCommonRequest;
import com.open.api.wechat.constants.WeChatAppUrlConstants;
import lombok.Data;

/**
 * @author : zhaoxuan
 * @date : 2021/7/1 13:21
 * @description : WeChatRetainRequest
 * @version: 1.0
 */
@Data
public class WeChatRetainRequest extends WeChatCommonRequest<WeChatRetainResponse> {

    private WeChatRetainCondition condition;

    @Override
    public String getDefaultUrl() {
        return "";
    }

    @Override
    public Object getCondition() {
        return condition;
    }

    @Override
    public HttpMethod getMethod() {
        return HttpMethod.POST;
    }

    @Override
    public Class<WeChatRetainResponse> getResponse() {
        return WeChatRetainResponse.class;
    }

    public void choiceDailyUrl(){
        super.setUrl(WeChatAppUrlConstants.APP_DAILY_RETAIN);
    }

    public void choiceMonthlyUrl(){
        super.setUrl(WeChatAppUrlConstants.APP_MONTHLY_RETAIN);
    }

    public void choiceWeeklyUrl(){
        super.setUrl(WeChatAppUrlConstants.APP_WEEKLY_RETAIN);
    }
}
